const Koa = require('koa')
const koaBody = require('koa-body')
const userRouter = require('../router/userRoute')

const app = new Koa()
// 在所有中间件之前注册koabody
app.use(koaBody())
// 中间件
app.use(userRouter.routes())

module.exports = app